﻿<?xml version="1.0" encoding="utf-8" ?>
<log4net>
  <appender name="rollingFile" type="log4net.Appender.RollingFileAppender,log4net" >

    <param name="File" value="log.txt" />
    <param name="AppendToFile" value="false" />
    <param name="RollingStyle" value="Date" />
    <param name="DatePattern" value="yyyy.MM.dd" />
    <param name="StaticLogFileName" value="true" />

    <layout type="log4net.Layout.PatternLayout,log4net">
      <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] &lt;%X{auth}&gt; - %m%n" />
    </layout>
  </appender>

  <root>
    <!--如果只需要看看Sql设置INFO就够了，如果你要调试可以设置为DEBUG或ALL-->
    <priority value="DEBUG" />
    <appender-ref ref="rollingFile" />
  </root>
</log4net>
